//
//  AlertTool.h
//  TeacherEdu2016
//
//  Created by ADIQueen on 16/12/7.
//  Copyright © 2016年 teacher of china. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

typedef void(^CancelClicked)(void);
typedef void(^DeteminClicked)(void);
typedef void(^ActionClicked)(void);

@interface AlertTool : NSObject

@property(nonatomic , copy) CancelClicked cancelClicked;
@property(nonatomic , copy) DeteminClicked deteminClicked;
@property(nonatomic , copy) ActionClicked actionClicked;

@property(nonatomic, strong)UIWindow *testWindow;

#pragma mark-中间显示
+ (void)showCenterWithText:(NSString *)text;
/**
 *  中间显示+自定义停留时间
 */
+ (void)showCenterWithText:(NSString *)text duration:(CGFloat)duration;

#pragma mark-上方显示
/**
 *  上方显示
 */
+ (void)showTopWithText:(NSString *)text;
/**
 *  上方显示+自定义停留时间
 */
+ (void)showTopWithText:(NSString *)text duration:(CGFloat)duration;
/**
 *  上方显示+自定义距顶端距离
 */
+ (void)showTopWithText:(NSString *)text topOffset:(CGFloat)topOffset;
/**
 *  上方显示+自定义距顶端距离+自定义停留时间
 */
+ (void)showTopWithText:(NSString *)text topOffset:(CGFloat)topOffset duration:(CGFloat)duration;

#pragma mark-下方显示
/**
 *  下方显示
 */
+ (void)showBottomWithText:(NSString *)text;
/**
 *  下方显示+自定义停留时间
 */
+ (void)showBottomWithText:(NSString *)text duration:(CGFloat)duration;
/**
 *  下方显示+自定义距底端距离
 */
+ (void)showBottomWithText:(NSString *)text bottomOffset:(CGFloat)bottomOffset;
/**
 *  下方显示+自定义距底端距离+自定义停留时间
 */
+ (void)showBottomWithText:(NSString *)text bottomOffset:(CGFloat)bottomOffset duration:(CGFloat)duration;

/**
 *  提示
 */
- (void)initMBProgressHUD:(NSString *)str inView:(UIView *)view;


-(void)showAlertWithOneButtonTitle:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle inViewController:(UIViewController *)viewcontroller  deteminClicked:(DeteminClicked)deteminClicked;
/**
 取消和删除选项弹窗
 */
-(void)showAlertWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle inViewController:(UIViewController *)viewcontroller cancelClicked:(CancelClicked)cancelClicked deteminClicked:(DeteminClicked)deteminClicked;


-(void)showAlertWithTitle:(NSString *)title subTitleOne:(NSString *)subTitleOne subTitleTwo:(NSString *)subTitleTwo message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle inViewController:(UIViewController *)viewcontroller cancelClicked:(CancelClicked)cancelClicked deteminClicked:(DeteminClicked)deteminClicked;

-(void)showAndDissmissAlertWithTitle:(NSString *)title message:(NSString *)message preferredStyle:(UIAlertControllerStyle)preferredStyle inViewController:(UIViewController *)viewcontroller;

/* 提示框的创建 */
+(void)showAlertView:(UIViewController *)viewController title:(NSString *)title message:(NSString *)message cancelButtonTitle:(NSString *)cancelButtonTitle otherButtonTitle:(NSString *)otherButtonTitle cancleHandler:(void (^)(void))cancle otherHandler:(void (^)(void))confirm;
/**
 底部弹窗 除取消之外有两个选项
 @param strArray         选项标题数组
 */
-(void)showActionSheetWithTwoActionTitle:(NSString *)title message:(NSString *)message inViewController:(UIViewController *)viewcontroller actionClicked:(ActionClicked)oneActionClicked actionClicked:(ActionClicked)twoActionClicked  titles:(NSArray *)strArray buts:(UIButton *)buts;

+(void)showActionSheetWithTwoActionTitle:(NSString *)title message:(NSString *)message inViewController:(UIViewController *)viewcontroller actionClicked:(ActionClicked)oneActionClicked   titles:(NSArray *)strArray;

+(void)showActionSheetWithSXWActionTitle:(NSString *)title message:(NSString *)message inViewController:(UIViewController *)viewcontroller actionClicked:(ActionClicked)oneActionClicked   titles:(NSArray *)strArray but:(UIButton *)but;

+(void)show2AlertTitle:(NSString *)title message:(NSString *)message invc:(UIViewController *)vc cancel:(ActionClicked)cancel detemin:(ActionClicked)detemin but:(UIButton *)but;
+(void)show2AlertMessage:(NSString *)message invc:(UIViewController *)vc cancel:(ActionClicked)cancel detemin:(ActionClicked)detemin but:(UIButton *)but;
/**
 底部弹窗 除取消之外有三个选项
 @param strArray           选项标题数组
 */
-(void)showActionSheetWithThreeActionTitle:(NSString *)title message:(NSString *)message inViewController:(UIViewController *)viewcontroller actionClicked:(ActionClicked)oneActionClicked actionClicked:(ActionClicked)twoActionClicked actionClicked:(ActionClicked)threeActionClicked titles:(NSArray *)strArray;



@end
